<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":true},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="开始进入深度强化学习阶段，本篇是深度强化学习的先导篇，介绍基础知识。">
<meta property="og:type" content="article">
<meta property="og:title" content="6-深度强化学习1">
<meta property="og:url" content="http://example.com/2022/02/28/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/6-%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A01/index.html">
<meta property="og:site_name" content="祖浩の博客">
<meta property="og:description" content="开始进入深度强化学习阶段，本篇是深度强化学习的先导篇，介绍基础知识。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/2022/02/28/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/6-%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A01/image-20220228201106528.png">
<meta property="og:image" content="http://example.com/2022/02/28/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/6-%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A01/image-20220228210802275.png">
<meta property="og:image" content="http://example.com/2022/02/28/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/6-%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A01/image-20220228212738580.png">
<meta property="og:image" content="http://example.com/2022/02/28/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/6-%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A01/image-20220228215853895.png">
<meta property="article:published_time" content="2022-02-28T11:45:36.000Z">
<meta property="article:modified_time" content="2022-03-01T04:14:09.009Z">
<meta property="article:author" content="谢祖浩">
<meta property="article:tag" content="强化学习">
<meta property="article:tag" content="时序差分法">
<meta property="article:tag" content="Q-learning">
<meta property="article:tag" content="深度强化学习">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/2022/02/28/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/6-%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A01/image-20220228201106528.png">

<link rel="canonical" href="http://example.com/2022/02/28/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/6-%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A01/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>6-深度强化学习1 | 祖浩の博客</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">祖浩の博客</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2022/02/28/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/6-%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A01/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/head.jpeg">
      <meta itemprop="name" content="谢祖浩">
      <meta itemprop="description" content="驽马十驾，功在不舍">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="祖浩の博客">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          6-深度强化学习1
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2022-02-28 19:45:36" itemprop="dateCreated datePublished" datetime="2022-02-28T19:45:36+08:00">2022-02-28</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2022-03-01 12:14:09" itemprop="dateModified" datetime="2022-03-01T12:14:09+08:00">2022-03-01</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/" itemprop="url" rel="index"><span itemprop="name">强化学习</span></a>
                </span>
            </span>

          
            <div class="post-description">开始进入深度强化学习阶段，本篇是深度强化学习的先导篇，介绍基础知识。</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="时序差分法"><a href="#时序差分法" class="headerlink" title="时序差分法"></a>时序差分法</h1><p>时序差分法 $temporal-difference$ 首先它可以像蒙特卡罗方法那样直接从经验中进行学习而不需要知道完整的环境模型，同时它又可以像动态规划方法那样根据已学习到的价值函数的估计进行当前估计的更新（步步更新），而不需等待整个episode结束。</p>
<h2 id="预测"><a href="#预测" class="headerlink" title="预测"></a>预测</h2><p>对于一个每次访问型的蒙特卡洛方法，其价值函数的更新方法如下：</p>
<p>$$<br>V\left(S_{t}\right) \leftarrow V\left(S_{t}\right)+\alpha\left[G_{t}-V\left(S_{t}\right)\right]<br>$$</p>
<p>其中$G_t$是$t$时刻的$return$值，$\alpha$是步长。只有在完成一幕之后，蒙特卡洛方法才对状态函数进行更新。而TD在每一步后就更新价值函数：</p>
<p>$$<br>V\left(S_{t}\right) \leftarrow V\left(S_{t}\right)+\alpha\left[R_{t+1}+\gamma V\left(S_{t+1}\right)-V\left(S_{t}\right)\right]<br>$$</p>
<p>其中$R_{t+1}$是状态$S_t$到$S_{t+1}$所获得的回报值。可以说MC方法更新的目标值是回报$G_t$，TD的目标值是$R_{t+1}+\gamma V(S_t)$.这个方法被称为<em>TD(0)</em>.</p>
<img src="image-20220228201106528.png" alt="image-20220228201106528" style="zoom: 40%;" />

<p>对于一个遵循策略$\pi$时获得价值函数$v_{\pi}$的agent，下式成立：</p>
<p>$$<br>\begin{aligned}<br>v_{\pi}(s) &amp; \doteq \mathbb{E}<em>{\pi}\left[G</em>{t} \mid S_{t}=s\right] \<br>&amp;=\mathbb{E}<em>{\pi}\left[R</em>{t+1}+\gamma G_{t+1} \mid S_{t}=s\right] \<br>&amp;=\mathbb{E}<em>{\pi}\left[R</em>{t+1}+\gamma v_{\pi}\left(S_{t+1}\right) \mid S_{t}=s\right]<br>\end{aligned}<br>$$</p>
<p>对于MC而言，更新目标值是对第一行式子的估计，而动态规划是对第三行式子的估计。在MC中，第一行的期望值是未知的，使用采样的$return$来代替实际的$return$；对于动态规划，第三行式子中的$v_{\pi}(S_{t+1})$是未知的，所以使用随机初始+迭代的方式来求取，使用估计的V值来代替实际V值；TD结合了两种方法，首先用采用的方法，其次使用估计的V来代替真实的V。</p>
<p>TD(0)和动态规划更新参数的方法都是$bootstrapping$，区别在于前者的更新仅仅来自下一状态，而后者来自所有可能的状态。</p>
<h2 id="Sarsa：On-policy-TD方法"><a href="#Sarsa：On-policy-TD方法" class="headerlink" title="Sarsa：On-policy TD方法"></a>Sarsa：On-policy TD方法</h2><p>对于TD的控制方法，也有两种，第一个就是同轨的Sarsa；首先改写状态价值函数更新公式为“状态-动作”二元组更新公式：</p>
<p>$$<br>Q\left(S_{t}, A_{t}\right) \leftarrow Q\left(S_{t}, A_{t}\right)+\alpha\left[R_{T+1}+\gamma Q\left(S_{t+1}, A_{t+1}\right)-Q\left(S_{t}, A_{t}\right)\right]<br>$$</p>
<p>策略的更新使用的一贯的贪心方法：</p>
<img src="image-20220228210802275.png" alt="image-20220228210802275" style="zoom:40%;" />

<p>值得注意的是，因为更新公式中要用的下一步的价值函数$Q(S_{t+1},A_{t+1})$，所以Sarsa方法每次更新都需要“走两步”。</p>
<h2 id="Q-learning：Off-policy-TD方法"><a href="#Q-learning：Off-policy-TD方法" class="headerlink" title="Q-learning：Off-policy TD方法"></a>Q-learning：Off-policy TD方法</h2><p>Q-learning是强化学习的一大突破，Q-learning的价值更新公式为：</p>
<p>$$<br>Q\left(S_{t}, A_{t}\right) \leftarrow Q\left(S_{t}, A_{t}\right)+\alpha\left[R_{t+1}+\gamma \max <em>{a} Q\left(S</em>{t+1}, a\right)-Q\left(S_{t}, A_{t}\right)\right]<br>$$</p>
<p>与Sarsa相比，Q-learning中目标值第二项$Q(S_{t+1},A_t)$直接选取的是所有动作中价值最大的一个，即Q-learning使用最大值代替策略选择，可以说其值更新的方式与agent所遵循的策略无关，其更新方向就是最佳行为价值函数$q_{*}$.</p>
<img src="image-20220228212738580.png" alt="image-20220228212738580" style="zoom:40%;" />

<p>因为下一步的价值函数被固定为最大的，相对Sarsa，只需要一步即可。</p>
<p>在$Q-learning$中，其对“状态-动作”值的更新都需要使用到下一个“状态-动作”的值（即：$\max <em>a Q(S</em>{t+1},a)$部分）。下一个状态的值如何获取呢？</p>
<p>因为Q-table的存在，下一个“状态-动作”的值第一次被随机给出，在实际运算后存储在Q-table里，供以后使用。</p>
<h2 id="Expected-Sarsa"><a href="#Expected-Sarsa" class="headerlink" title="Expected Sarsa"></a>Expected Sarsa</h2><p>把Sarsa更新公式中的$Q(S_{t+1},A_{t+1})$换为期望值，Sarsa就变为了离轨策略：</p>
<p>$$<br>\begin{aligned}<br>Q\left(S_{t}, A_{t}\right) &amp; \leftarrow Q\left(S_{t}, A_{t}\right)+\alpha\left[R_{t+1}+\gamma \mathbb{E}\left[Q\left(S_{t+1}, A_{t+1}\right) \mid S_{t+1}\right]-Q\left(S_{t}, A_{t}\right)\right] \<br>&amp; \leftarrow Q\left(S_{t}, A_{t}\right)+\alpha\left[R_{t+1}+\gamma \sum_{a} \pi\left(a \mid S_{t+1}\right) Q\left(S_{t+1}, a\right)-Q\left(S_{t}, A_{t}\right)\right]<br>\end{aligned}<br>$$</p>
<h2 id="Maximization-Bias-和Double-Learning"><a href="#Maximization-Bias-和Double-Learning" class="headerlink" title="Maximization Bias 和Double Learning"></a>Maximization Bias 和Double Learning</h2><p>上面所说的所有方法，都不可避免的有最大化目标策略的趋势，如：Q-learning中使用最大值代替下一步的策略选择，Sarsa使用的贪心算法中也有最大化手法。</p>
<p>这会导致价值函数产生正向偏差。举例来说，对于一个状态$s$，其所有可选行为对应的真实$Q(S_t,A_t)$都为0，但因为估计函数的不确定，有大于0也有小于0的，使用上述的方法势必会导致估计值的偏离，这种现象为Maximization Bias。</p>
<p>如何规避这个现象呢？有一种看法是，确定价值最大的动作和估计其价值这两个过程使用了相同的样本。那么解决办法就是把样本分为两份，并用他们来学习两个不同的价值函数：$Q_1(a),Q_2(a)$；他们都是真实价值$q(a)$的估计值。</p>
<p>用$Q_1$来确定最大价值的动作$A^{<em>}=\arg \max <em>{a} Q</em>{1}(a)$，$Q_2$用来计算$A^</em>$价值的估计：$Q_{2}\left(A^{<em>}\right)=Q_{2}\left(\arg \max <em>{a} Q</em>{1}(a)\right)$。采用这种估计方式可以做到无偏估计，即$E\left[Q_{2}\left(A^{</em>}\right)\right]=q\left(A^{*}\right)$。这就是$double~learning$的主要思想。</p>
<p>$double<del>Q-learning$是$double</del>learning$的一种体现，他把所有时刻一分为二，其中一个时刻更新公式如下</p>
<p>$$<br>Q_{1}\left(S_{t}, A_{t}\right) \leftarrow Q_{1}\left(S_{t}, A_{t}\right)+\alpha\left[R_{t+1}+\gamma {\color{red}Q_{2}}\left(S_{t+1}, {\color{red}\underset{a}{\arg \max } Q_{1}\left(S_{t+1}, a\right)}\right)-Q_{1}\left(S_{t}, A_{t}\right)\right]<br>$$</p>
<p>在另一个时刻，交换$Q_1,Q_2$。对比$Q-learning$的更新公式：</p>
<p>$$<br>Q\left(S_{t}, A_{t}\right) \leftarrow Q\left(S_{t}, A_{t}\right)+\alpha\left[R_{t+1}+\gamma \max <em>{a} Q\left(S</em>{t+1}, a\right)-Q\left(S_{t}, A_{t}\right)\right]<br>$$</p>
<p>可以发现，最大价值动作的选择使用的是$Q_1$中的数据，而动作价值的估计使用的是$Q_2$中的数据。</p>
<img src="image-20220228215853895.png" alt="image-20220228215853895" style="zoom:50%;" />

<p>这种$double~leaning$的思想可以应用在之前所有的算法上，双Q学习只需要原来两倍的内存而不需要两倍的计算；</p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/" rel="tag"># 强化学习</a>
              <a href="/tags/%E6%97%B6%E5%BA%8F%E5%B7%AE%E5%88%86%E6%B3%95/" rel="tag"># 时序差分法</a>
              <a href="/tags/Q-learning/" rel="tag"># Q-learning</a>
              <a href="/tags/%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/" rel="tag"># 深度强化学习</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/11/04/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/5-%E8%92%99%E7%89%B9%E5%8D%A1%E6%B4%9B%E6%96%B9%E6%B3%95/" rel="prev" title="5-蒙特卡洛方法">
      <i class="fa fa-chevron-left"></i> 5-蒙特卡洛方法
    </a></div>
      <div class="post-nav-item">
    <a href="/2022/03/01/%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A0/7-%E6%B7%B1%E5%BA%A6%E5%BC%BA%E5%8C%96%E5%AD%A6%E4%B9%A02/" rel="next" title="深度强化学习2">
      深度强化学习2 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%97%B6%E5%BA%8F%E5%B7%AE%E5%88%86%E6%B3%95"><span class="nav-number">1.</span> <span class="nav-text">时序差分法</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%A2%84%E6%B5%8B"><span class="nav-number">1.1.</span> <span class="nav-text">预测</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Sarsa%EF%BC%9AOn-policy-TD%E6%96%B9%E6%B3%95"><span class="nav-number">1.2.</span> <span class="nav-text">Sarsa：On-policy TD方法</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Q-learning%EF%BC%9AOff-policy-TD%E6%96%B9%E6%B3%95"><span class="nav-number">1.3.</span> <span class="nav-text">Q-learning：Off-policy TD方法</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Expected-Sarsa"><span class="nav-number">1.4.</span> <span class="nav-text">Expected Sarsa</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Maximization-Bias-%E5%92%8CDouble-Learning"><span class="nav-number">1.5.</span> <span class="nav-text">Maximization Bias 和Double Learning</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="谢祖浩"
      src="/images/head.jpeg">
  <p class="site-author-name" itemprop="name">谢祖浩</p>
  <div class="site-description" itemprop="description">驽马十驾，功在不舍</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">9</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">13</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">谢祖浩</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  
      

<script>
  if (typeof MathJax === 'undefined') {
    window.MathJax = {
      loader: {
        source: {
          '[tex]/amsCd': '[tex]/amscd',
          '[tex]/AMScd': '[tex]/amscd'
        }
      },
      tex: {
        inlineMath: {'[+]': [['$', '$']]},
        tags: 'ams'
      },
      options: {
        renderActions: {
          findScript: [10, doc => {
            document.querySelectorAll('script[type^="math/tex"]').forEach(node => {
              const display = !!node.type.match(/; *mode=display/);
              const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
              const text = document.createTextNode('');
              node.parentNode.replaceChild(text, node);
              math.start = {node: text, delim: '', n: 0};
              math.end = {node: text, delim: '', n: 0};
              doc.math.push(math);
            });
          }, '', false],
          insertedScript: [200, () => {
            document.querySelectorAll('mjx-container').forEach(node => {
              let target = node.parentNode;
              if (target.nodeName.toLowerCase() === 'li') {
                target.parentNode.classList.add('has-jax');
              }
            });
          }, '', false]
        }
      }
    };
    (function () {
      var script = document.createElement('script');
      script.src = '//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
      script.defer = true;
      document.head.appendChild(script);
    })();
  } else {
    MathJax.startup.document.state(0);
    MathJax.texReset();
    MathJax.typeset();
  }
</script>

    

  

</body>
</html>
